package com.nbsaas.boot.shop.rest.convert;

import com.nbsaas.boot.shop.data.entity.ShopAppPage;
import com.nbsaas.boot.shop.api.domain.simple.ShopAppPageSimple;

import com.nbsaas.boot.rest.api.Converter;

/**
* 列表对象转换器
*/

public class ShopAppPageSimpleConvert implements Converter<ShopAppPageSimple, ShopAppPage> {




@Override
public ShopAppPageSimple convert(ShopAppPage source) {
    ShopAppPageSimple result = new ShopAppPageSimple();

                if(source.getShop()!=null){
                    result.setShop(source.getShop().getId());
                }
                result.setName(source.getName());
                if(source.getShop()!=null){
                    result.setShopName(source.getShop().getName());
                }
                result.setSortNum(source.getSortNum());
                if(source.getStaff()!=null){
                    result.setStaff(source.getStaff().getId());
                }
                result.setId(source.getId());
                result.setAddDate(source.getAddDate());
                result.setUrl(source.getUrl());
                result.setLastDate(source.getLastDate());


    return result;
}

}